<div class="container-fluid">
    <div class="row ikg-row">
        <div class="col-lg-3 ikg-col">
            <div id="treeBar" class="panel panel-default ikg-panel ikg-page-panel-no-search">
                <div class="panel-heading ikg-panel-heading">
                    <h3 class="panel-title ikg-panel-title">
                        <i class="fa fa-bank" aria-hidden="true"></i>&nbsp;&nbsp;组织机构树
                    </h3>
                </div>
                <div class="panel-body ikg-panel-body">
                    <div data-bind="jsTreeView:treeViewModel"></div>
                </div>
            </div>
        </div>
        <div class="col-lg-9 ikg-col">
            <!-- 工具栏 -->
            <div class="row ikg-row">
                <div class="col-sm-12 ikg-col">
                    <div id="toolbar" class="btn-group">
                        <button type="button" class="btn btn-success btn-sm" data-bind="click:fnAdd">
                            <i class="fa fa-plus fa-lg" aria-hidden="true"></i><span
                                class="hidden-sm hidden-xs"> 新增</span>
                        </button>
                        <button type="button" class="btn btn-success btn-sm" data-bind="click:fnRemove">
                            <i class="fa fa-trash fa-lg" aria-hidden="true"></i><span
                                class="hidden-sm hidden-xs"> 删除</span>
                        </button>
                        <button type="button" class="btn btn-success btn-sm" data-bind="click:fnEdit">
                            <i class="fa fa-pencil-square-o fa-lg" aria-hidden="true"></i><span
                                class="hidden-sm hidden-xs"> 编辑</span>
                        </button>
                        <button type="button" class="btn btn-success btn-sm" data-bind="click:fnView">
                            <i class="fa fa-file-text fa-lg" aria-hidden="true"></i><span class="hidden-sm hidden-xs"> 查看</span>
                        </button>
                        <button type="button" class="btn btn-success btn-sm" data-bind="click:fnMove">
                            <i class="fa fa-send fa-lg" aria-hidden="true"></i><span
                                class="hidden-sm hidden-xs"> 迁移</span>
                        </button>
                    </div>
                </div>
            </div>
            <!-- 列表 -->
            <div class="row ikg-row">
                <div class="col-sm-12 ikg-col">
                    <table data-bind="tableView:tableViewModel"></table>
                </div>
            </div>
        </div>
    </div>
</div>

<div id="orgDialog" class="modal hide" tabindex="-1" role="dialog"
     data-bind="template:{name:'orgModalTemplate',data:orgViewModel},ikgModal:{ backdrop: 'static', keyboard: false, show: modalVisible}"></div>

<!--<div id="moveDialog" class="modal hide" tabindex="-1" role="dialog"-->
<!--data-bind="template:{name:'moveTreeTemplate',data:moveTreeViewModel},ikgModal:{ backdrop: 'static', keyboard: false, show: treeModalVisible}"></div>-->
<!--inside template-->
<script type="text/html" id="orgModalTemplate">
    <div class="modal-dialog" style="width: 500px" role="document">
        <div class="modal-content">
            <!-- header -->
            <div class="modal-header ikg-modal-header" id="modalHeader">
                <button type="button" class="close ikg-close" data-bind="click: close">&times;</button>
                <span class="modal-title ikg-modal-title" data-bind="text:title"></span>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" id="detailForm" autocomplete="off">
                    <div class="form-group">
                        <label for="orgName" class="col-sm-3 control-label">组织机构</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" name="orgName" id="orgName" placeholder="*,必填"
                                   data-bind="value:orgName">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="orgCode" class="col-sm-3 control-label">组织机构代码</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" name="orgCode" id="orgCode" placeholder="*,选填"
                                   data-bind="value:orgCode">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">管理级别</label>
                        <div class="col-sm-8">
                            <select class="form-control" name="orgLevel"
                                    data-bind="options:orgLevelGroup,
                                    optionsText:'code_text',
                                    optionsValue:'code_value',
                                    value:orgLevel,
                                    optionsCaption:'请选择'"></select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="orgType" class="col-sm-3 control-label">机构类型</label>
                        <div class="col-sm-8">
                            <select class="form-control" name="orgType" id="orgType"
                                    data-bind="options:orgTypeGroup,optionsText:'code_text',optionsValue:'code_value',value:orgType,optionsCaption:'请选择'"></select>
                        </div>
                    </div>
                    <!-- 默认基本信息 -->
                    <div style="display: none">
                        <input type="text" data-bind="value:orgId">
                        <input type="text" data-bind="value:editStatus">
                        <input type="text" data-bind="value:recordStatus">
                        <input type="text" data-bind="value:pOrgId">
                    </div>
                </form>
            </div>
            <div class="modal-footer" id="modalFooter">
                <button type="button" class="btn btn-success ikg-btn-12" data-bind="click:save,visible:enabled">
                    <i class="fa fa-save"></i> 保存
                </button>
                <button type="button" class="btn btn-default ikg-btn-12" data-bind="click:close">
                    <i class="fa fa-close"></i> 关闭
                </button>
            </div>
        </div>
    </div>
</script>
<!--<script type="text/html" id="moveTreeTemplate">-->
<!--<div class="modal-dialog" style="width: 400px;height: 360px;" role="document">-->
<!--<div class="modal-content">-->
<!--<div class="modal-header ikg-modal-header">-->
<!--<button type="button" class="close ikg-close" data-bind="click: close">&times;</button>-->
<!--<span class="modal-title ikg-modal-title" data-bind="text:title"></span>-->
<!--</div>-->
<!--<div class="modal-body">-->
<!--<div id="targetTree">-->
<!--<div class="loading">-->
<!--<span></span>-->
<!--<span></span>-->
<!--<span></span>-->
<!--<span></span>-->
<!--<span></span>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--<div class="modal-footer">-->
<!--<button type="button" class="btn btn-primary ikg-btn-12" data-bind="click:confirm">-->
<!--<i class="fa fa-check"></i> 确认-->
<!--</button>-->
<!--<button type="button" class="btn btn-success ikg-btn-12" data-bind="click:close">-->
<!--<i class="fa fa-close"></i> 取消-->
<!--</button>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</script>-->